<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="/layout/admin_template.xhtml">

    <ui:define name="body">
    	<h:form>
    		<rich:panel>
    			<f:facet name="header"></f:facet>
	    		<h:commandButton value="#{messages.back_msg}" action="e_aimage" immediate="true"/>
	    		<rich:spacer width="10" />
	    		<h:commandButton value="#{messages.save_msg}" action="#{kAIManager.save()}" />
	    		<br />
	    		<table>
	    			<tr>
	    				<td>
				    		<ui:include src="/pages/in/k_translate.xhtml" >
				    			<ui:param name="item" value="#{kAIManager.image}" />
				    		</ui:include>
	    				</td>
	    			</tr>
	    		</table>
	    		<s:fragment id="upload_id" rendered="#{kAIManager.image.id gt 0}">
		    		<rich:fileUpload 
		    			autoclear="true"
		    			noDuplicate="true"
		    			sizeErrorLabel="TOO BIG"
		    			acceptedTypes="PNG,JPG" 
		    			listHeight="50"
		    			fileUploadListener="#{kAIManager.processUpload}" >
		    			<a:support event="oncomplete" reRender="upload_id"/>
		    		</rich:fileUpload>
	    		</s:fragment>
    		</rich:panel>
    	</h:form>
    </ui:define>
</ui:composition>
